/**
 * FileFind - ftp/shares indexing and search php engine
 * Module: webapp-jsf12
 * Description: Implementation of webapp using JSF 1.2
 * Copyright (c) 2003-2010 Rage Steel, www.gt2.ru
 */
package ru.ffind.webapp.jsf12.beans;

import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import ru.ffind.common.model.Entry;
import ru.ffind.persist.service.EntryService;

/**
 * Bean for browsing host.
 * 
 * @author Rage Steel
 */
public class BrowseBean {
	
	private static final Logger LOGGER = 
		Logger.getLogger(BrowseBean.class.getName());
	
	private EntryService entryService;
	
	public void setEntryService(EntryService entryService) {
		this.entryService = entryService;
	}
	
	private Integer dirId;
	
	public void setDirId(Integer dirId) {
		this.dirId = dirId;
	}
	
	public List<Entry> getEntries() {
		List<Entry> result = entryService.findEntriesById(dirId);
		LOGGER.log(Level.INFO, "getEntries count: {0}", result.size());
		return result;
	}

}
